package org.jeecg.glr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.glr.entity.GlrLight;

/**
 * @Description: 路灯管理
 * @Author: jeecg-boot
 * @Date:   2020-03-05
 * @Version: V1.0
 */
public interface GlrLightMapper extends BaseMapper<GlrLight> {

    @Select("SELECT max(code) from glr_light WHERE gate_way_code=#{gateWayCode}")
    public String  getMaxLightCodeByGateWayCode(String gateWayCode);
    @Select("${sql}")
    int getLightCount(@Param("sql")String sql);
    @Delete("delete from  glr_light WHERE gate_way_code=#{gateWayCode}")
    void deleteByGateWayCode(@Param("gateWayCode")String gateWayCode);
}
